package com.bw.pojo.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.bw.pojo.PurchaseGoods;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PurchaseVo {
    //单据
    private Integer purchaseId;
    //购买单号
    private String purchaseCode;
    //购物时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date purchaseTime;
    //购物总数量
    private Integer purchaseNum;
    //购物总价
    private BigDecimal purchaseSumPrice;
    //购物地址
    private String address;
    //用户id
    private Integer uid;
    //供应商id
    private Integer supplierId;
    //折扣
    private Double discount;
    //实付金额
    private BigDecimal payMoney;
    //当前页数
    private Integer pageNum = 1;
    //每页展示条数
    private Integer pageSize = 2;

    //一对多(一个单据表 多个 明细中间表)
    private ArrayList<PurchaseGoods> arr = new ArrayList<>(); //必须new对象
}
